package com.xnyzc.lhy.resource.entity.invoice;

import com.xnyzc.lhy.common.penum.invoice.EInvoiceErrorCode;
import lombok.Data;

import java.io.Serializable;

@Data
public class InvoiceErrorResponse implements Serializable {
    private static final long serialVersionUID = -1580620424837593435L;
    /**
     * 错误代码
     */
    private String code;

    /**
     * 错误消息
     */
    private String message;

    public InvoiceErrorResponse(String code, String message){
        this.code = code;
        this.message = message;
    }

    public InvoiceErrorResponse(EInvoiceErrorCode eInvoiceErrorCode){
        this.code = eInvoiceErrorCode.getValue().toString();
        this.message = eInvoiceErrorCode.getDesc();
    }


}
